#pragma once
#include "stdafx.h"

namespace common {
	extern HMODULE hInstance;
	extern HHOOK hhk;

	inline LPVOID GetProcAddress(LPCTSTR lpModuleName,LPCSTR lpProcName) {
		auto hModule = LoadLibrary(lpModuleName);
		return GetProcAddress(hModule, lpProcName);
	}
	inline void GetCurrentProcessName(std::wstring &ProcessName) {
		TCHAR Name[MAX_PATH];
		::GetModuleFileName(NULL, Name, MAX_PATH);
		ProcessName = std::wstring(Name);
	}
	LRESULT CALLBACK CBTProc(
		int    nCode,
		WPARAM wParam,
		LPARAM lParam
	);
}

#ifdef COMMON_DEFINE
namespace common {
	HMODULE hInstance;
	HHOOK hhk;
}
#endif // DEBUG

